﻿using System;

namespace AbstractFactoryPatterDemo
{
    /// <summary>
    /// 具体工厂1----生产对应产品A2及B2
    /// </summary>
    public class ConCreateFactory2 : AbstractFactory
    {
        public ConCreateFactory2()
        {
            Console.WriteLine("当前工厂使用ConCreateFactory2");
        }

        public override AbstractProductA CreateProductA()
        {
            Console.WriteLine("ConCreateFactory2创建产品A2");

            return new ProductA2();
        }

        public override AbstractProductB CreateProductB()
        {
            Console.WriteLine("ConCreateFactory2创建产品B2");

            return new ProductB2();
        }
    }
}